package com.zeta.eduservice.mapper;

import com.zeta.eduservice.entity.EduTeacher;
import com.zeta.eduservice.entity.EduTeachergroup;
import com.zeta.eduservice.entity.vo.TeacherVo;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 * 教师组和教师中间表 Mapper 接口
 * </p>
 *
 * @author zeta
 * @since 2020-10-20
 */
public interface EduTeachergroupMapper extends BaseMapper<EduTeachergroup> {

	List<TeacherVo> getTeacherById(String id);

	List<EduTeachergroup> getTeacherGroupById(String teacherId);

	@Select("select b.id,b.name,c.`name` academy ,b.number ,b.intro,b.`level` from edu_teachergroup_and_teacher a join edu_teacher b on b.id=a.teacher_id join edu_academy c on c.id=b.academy where a.teachergroup_id=#{GroupId}  and b.is_deleted=0")
	List<EduTeacher> getByGroupId(Page<EduTeacher> pageParam, @Param("GroupId") String GroupId);

}
